package com.tsystems.train.bean;

import java.io.Serializable;

import javax.enterprise.context.SessionScoped;
import javax.faces.context.FacesContext;
import javax.inject.Named;

  
@Named("mainBean")
@SessionScoped
public class MainBean implements Serializable {  

	private static final long serialVersionUID = -595216074869651976L;
 
    public String logout() {
        FacesContext.getCurrentInstance().getExternalContext().invalidateSession();
        return "login?faces-redirect=true";
    }
}  